package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServlet;

/***
 * title AccountController
 * @description <TODO description class purpose>
 * @author ZCZ
 * @version 1.0.0
 * @create 2022/9/1 19:29
 **/
@Controller
@RequestMapping("account")

public class AccountController {
    @Autowired
    AccountService accountService;

    @RequestMapping("transfer")
    @ResponseBody
    public BaseRespVo transfer(int fromId,int destId,int money){
        accountService.transfer(fromId,destId,money);
        return BaseRespVo.ok("转账成功");
    }
}
